const code =`
<template>
    <ui-dropdown-tree size="small"
    :model-id.sync="modelId"
    :model-label.sync="modelLabel"
    :model-custom.sync="modelCustom"
    :treeData="treeData"
    placeholder="单选下拉树"
    custom="name"
   ></ui-dropdown-tree>
</template>
<script>
   export default {
        props: {
            comp: {
                type:  [Function, Object]
             }
        },
        data() {
             return {
                modelId:'3-3-1',
                modelLabel:this.comp.data,
                modelCustom:'',
                treeData:[]
             }
        },
        mounted() {
            // this.log('open dropdown-tree.js')
            setTimeout(() => {
                this.treeData = [
                    {
                        'id':1,
                        'label':'一级 1',
                        'can_select':0,
                        'children':[
                            {
                                'id':4,
                                'label':'二级 1-1',
                                'can_select':0,
                                'children':[
                                    {
                                        'id':9,
                                        'can_select':1,
                                        'label':'驴子 1-1-1',
                                        'pinyin_code':'lv',
                                        name: {
                                            xxx:12312312
                                        },
                                    },
                                    {
                                        'id':10,
                                        'can_select':1,
                                        'label':'三级 1-1-2',
                                        'pinyin_code':'0'
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        'id':2,
                        'label':'一级 2',
                        'children':[
                            {
                                'id':5,
                                'label':'二级 2-1'
                            },
                            {
                                'id':6,
                                'label':'二级 2-2',
                                disabled: true,
                            }
                        ]
                    },
                    {
                        'id':'3-3',
                        'label':'一级 3',
                        'children':[
                            {
                                'id':'3-3-1',
                                'label':'二级 3-1'
                            },
                            {
                                'id':8,
                                'label':'二级 3-2'
                            }
                        ]
                    }
                ]
            })
        },
        watch: {
            modelLabel : {
              handler (val, oldVal) {
                this.$emit('global:CELL_EDIT_TABLE', val);
              },
              immediate: true,
            }
        },
        methods: {
            
        },
        beforeDestroy(){
            // console.log('bye bye dropdown-tree.js')
            this.$emit('global:CELL_EDIT_TABLE_BYE', true);
        }
    }
</script>`;

export default code;
